# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Nikolay Rysev <mad.f3ka@gmail.com>

pkgname=fprintd
pkgver=0.7.0+12+ge55ad52
pkgrel=3
pkgdesc="D-Bus service to access fingerprint readers"
arch=(i686 x86_64)
url="https://www.freedesktop.org/wiki/Software/fprint/fprintd"
license=(GPL)
depends=(libfprint dbus-glib polkit)
makedepends=(intltool gtk-doc gnome-common git)
groups=(fprint)
_commit=e55ad52ded43dacd0f63ed57c2e02eac232e3e58  # master
source=("git+https://anongit.freedesktop.org/git/libfprint/fprintd#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^V_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/lib \
    --localstatedir=/var \
    --disable-static \
    --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  install -d -m 700 "$pkgdir/var/lib/fprint"
}
